//
//  listSumViewCell.swift
//  NewLndd
//
//  Created by 邵禹曦 on 2020/1/7.
//  Copyright © 2020 辽宁当代. All rights reserved.
//

import UIKit
// MARK: - 挂单
class listSumViewCell: UITableViewCell {
    // MARK: - 属性
    @IBOutlet weak var CON: UILabel!    // 商品名称
    @IBOutlet weak var COI: UILabel!   // 商品代码
    @IBOutlet weak var ON: UILabel!      // 挂单号
    @IBOutlet weak var BS: UILabel!   // 买卖方向
    @IBOutlet weak var OP: UILabel!      // 挂单价格
    @IBOutlet weak var OQ: UILabel! //OQ挂单数量
    @IBOutlet weak var BAL: UILabel!  //未成交数量
    @IBOutlet weak var OS: UILabel! //状态
    @IBOutlet weak var OT: UILabel! //挂单时间
    @IBOutlet weak var WDT: UILabel!  // 撤单时间
    @IBOutlet weak var cedan: UIButton!
    
    // MARK: - 自定义属性
    var ViewModel : listSum? {
        
        // 属性监听器
        didSet {
            
            // 1. nil值校验
            guard let ViewModel = ViewModel else {
                return
            }
            COI.text = ViewModel.COI
            CON.text = ViewModel.CON
            ON.text = ViewModel.ON
            BS.text = ViewModel.BS
            OP.text = ViewModel.OP
            OQ.text = ViewModel.OQ
            BAL.text = ViewModel.BAL
            OS.text = ViewModel.OS
            OT.text = ViewModel.OT
            WDT.text = ViewModel.WDT
            
           
           
        }
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
